package com.example.testmysql.service.impl;

import com.example.testmysql.dao.BookDao;
import com.example.testmysql.entity.TBook;
import com.example.testmysql.service.BookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BookServiceImpl implements BookService {

    @Resource
    private BookDao bookDao;

    @Override
    public int save(TBook book) {
        return bookDao.save(book);
    }

    @Override
    public TBook queryBookByBookName(String bookName) {
        return bookDao.queryBookByBookName(bookName);
    }

    @Override
    public List<TBook> queryBookByPublisher(String publisher) {
        return bookDao.queryBookByPublisher(publisher);
    }

    @Override
    public void deleteBook(String bookName) {
        bookDao.deleteBook(bookName);
    }



}
